type ObjectEntries<T, R extends T = {
    [P in keyof T]-?: T[P]
}, K extends keyof T = keyof T> = K extends K
    ? [K, R[K]] extends [K, (infer V | undefined)]
        ? [V] extends [never] 
            ? [K, undefined] 
            : [K, R[K]] 
        : [K, R[K]] 
    : []

// V 需要套上[]防止联合类型扩散